<!DOCTYPE html>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta charset="utf-8">
        <title>monochrome</title>
        
        <style>
            .circle {
                position:absolute;
                left: 0px;
                top: 0px;
                width:50px;
                height:50px;
                border-radius: 50px;
                -webkit-box-shadow: 2px 2px 8px black;
                background: red;
            }
        </style>
        
        <script type="text/javascript" src="./../../src/tmlib.js"></script>
        <script>
            TM.loadScript("dom", "dom");
            
            TM.main(function(){
                var $ = TM.DOM.DOM;
                
                var circle  = TM.$DOMElement(".circle");
                var body    = TM.$DOMElement(document.body);
                
                body.key.down("left",   function(e) { circle.x -= (e.shiftKey)? 20:1; });
                body.key.down("right",  function(e) { circle.x += (e.shiftKey)? 20:1; });
                body.key.down("up",     function(e) { circle.y -= (e.shiftKey)? 20:1; });
                body.key.down("down",   function(e) { circle.y += (e.shiftKey)? 20:1; });
            });
        </script>
        
    </head>
    
    <body>
        <div class="circle"></div>
    </body>
</html>





















